import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/login', component: () => import('@/components/Login/logind.vue') },
    {
      path: '/',
      component: () => import('@/components/Shouye/shouyed.vue'),
      redirect: '/peijian',
      children: [
        {
          path: '/peijian',
          component: () => import('@/views/peijian/peijiand.vue'),
        },
        {
          path: '/yonghu',
          component: () => import('@/views/yonghu/yonghud.vue'),
        },
        {
          path: '/pinpai',
          component: () => import('@/views/pinpai/pinpaid.vue'),
        },
        {
          path: '/glxh',
          component: () => import('@/views/glxh/glxhd.vue'),
        },
        {
          path: '/pinlei',
          component: () => import('@/views/pinlei/pinleid.vue'),
        },
        {
          path: '/pjpz',
          component: () => import('@/views/pjpz/pipzd.vue'),
        },
        {
          path: '/ddjl',
          component: () => import('@/views/ddjl/ddjld.vue'),
        },
        {
          path: '/ddts',
          component: () => import('@/views/ddts/ddtsd.vue'),
        },
      ],
    },
  ],
})

export default router
